﻿using FriendlyURL.Web.Domain.Abstract;
using Ninject.Modules;

namespace FriendlyURL.Web.Domain.Impl
{
    /// <summary>
    /// Configures how abstract service types are mapped to concrete implementations
    /// </summary>
    internal class ServiceModule : NinjectModule
    {
        public override void Load()
        {
            Bind<ICache>().To<Domain.Impl.Cache>();
            Bind<IConfiguration>().To<Domain.Impl.Configuration>();
            Bind<IMessageHandler>().To<Domain.Impl.MessageHandler>();
            Bind<IUserCookie>().To<Domain.Impl.UserCookie>();
            Bind<IWebContext>().To<Domain.Impl.WebContext>();
            Bind<IContentFilterRepository>().To<Domain.Repositories.ContentFilterRepository>();
            Bind<ILinkRepository>().To<Domain.Repositories.LinkRepository>();
            Bind<IRequestLogRepository>().To<Domain.Repositories.RequestLogRepository>();
            Bind<IRoleRepository>().To<Domain.Repositories.RoleRepository>();
            Bind<IUserRepository>().To<Domain.Repositories.UserRepository>();
        }
    }
}
